
/**
 * This file is part of Nokia OMAF implementation
 *
 * Copyright (c) 2018-2019 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
 *
 * Contact: omaf@nokia.com
 *
 * This software, including documentation, is protected by copyright controlled by Nokia Corporation and/ or its
 * subsidiaries. All rights are reserved.
 *
 * Copying, including reproducing, storing, adapting or translating, any or all of this material requires the prior
 * written consent of Nokia.
 */
#pragma once

#include <string>

#include "videoinput.h"

#include "common/exceptions.h"
#include "common/optional.h"

namespace VDD
{
    class ExpectedExactlyOneVRTrack : public Exception
    {
    public:
        ExpectedExactlyOneVRTrack();
    };

    class UnsupportedStereoscopicLayout : public Exception
    {
    public:
        UnsupportedStereoscopicLayout(std::string aMessage);

        std::string message() const;

    private:
        std::string mMessage;
    };

    class ControllerOps;
    class ControllerConfigure;
    class MP4Loader;

    struct GoogleVRVideoMetadata
    {
        VideoInputMode mode;
        TrackId vrTrackId;
    };

    /** @brief Given an MP4Loader, retrieve its Google VR Video Metadata, if any */
    Optional<GoogleVRVideoMetadata> loadGoogleVRVideoMetadata(MP4Loader& aMP4Loader);

}
